package com.industrial.system.mapper;

import com.industrial.system.api.domain.BizAccountMapping;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface BizAccountMappingMapper {
    /**
     * 通过省用户Id查询业务用户
     * @param zwfwuuid 省用户ID
     * @return 用户信息
     */
    BizAccountMapping selectUserMappingInfoByZwfwuuid(@Param("zwfwuuid") String zwfwuuid,@Param("uscc") String uscc);

    /**
     * 插入省用户与业务用户的关系
     * @param insertParams
     */
    void insert(BizAccountMapping insertParams);

    int selectUserExisted(@Param("userName") String userName, @Param("zwfwuuid") String zwfwuuid);

    @Select("select count(1) from biz_account_mapping where biz_user_name = #{uscc}")
    int selectUserUuidMappingCount(@Param("uscc") String uscc);

    BizAccountMapping selectUserBindInfo(@Param("userId") String userId);

}
